package day1130book;

public class Book implements Comparable<Book>{
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public Integer getCount() {
		return count;
	}
	public void setCount(Integer count) {
		this.count = count;
	}
	public void addCount() {
		count++;
	}
	public String toString() {
		return "书名: "+name+" 借阅次数： "+count+" 当前状态: "+status;
	}
	private String name;
	private String status;//记录该书目前状态 ，空闲为on，被借走为off；
	private Integer count;//被借阅次数
	@Override
	public int compareTo(Book o) {
		// TODO Auto-generated method stub
		return o.getCount()-this.getCount();
	}

}
